package com.zhx.common.chat.service.strategy.mark;

import com.zhx.common.chat.domain.enums.MessageMarkTypeEnum;
import org.springframework.stereotype.Component;

@Component
public class LikeStrategy extends AbstractMsgMarkStrategy{

    @Override
    protected MessageMarkTypeEnum getTypeEnum() {
        return MessageMarkTypeEnum.LIKE;
    }

    @Override
    protected void doMark(Long uid, Long msgId) {
        super.doMark(uid, msgId);
        MsgMarkStrategyFactory.getStrategyNoNull(MessageMarkTypeEnum.DISLIKE.getType())
                .unMark(uid, msgId);
    }
}
